'use strict';
const ApiErrorNames = require('../error/ApiErrorNames')
exports.handleError = ({ctx, error_name = ApiErrorNames.UNKNOW_ERROR}) => {
   return ctx.body = ApiErrorNames.getErrorInfo(error_name)
}
exports.handleSuccess = ({ctx, msg = 'success', data = null, code = 0}) => {
    return  ctx.body = {msg, data, code}
}